var _Anima = require('anima/anima.js');
var _inherit = require('core/inherit.js');

var _Target = require('./targetaction.js');

// ==========================
// ScorePopup
// ==========================
var _Node = require('component/node.js');
function CelebrateView() {
    _Node.call(this);
}
_inherit(CelebrateView, _Node);

// ==========================
// ScorePopup
// ==========================
function CelebrateAnima() {
    _Anima.call(this);
    _Target.onCreate(this);
    this.mView = new CelebrateView();
}
_inherit(CelebrateAnima, _Anima);
_Target.asAction(CelebrateAnima);

CelebrateAnima.prototype.getView = function () {
    return this.mView;
};
CelebrateAnima.prototype.resize = function (w, h) {
    this.mView.resize(w, h);
};
CelebrateAnima.prototype.update = function (stride) {
    this.mFinish = true;
    if (this.mFinish) {
        this.onFinish();
    }
};
CelebrateAnima.prototype.onFinish = function () {
    this.fire('finish', this);
    this.off('finish');
};

module.exports = CelebrateAnima;